<html>
<head>
    <title>same origin test</title>
</head>
<body>
<!--<iframe id="ifr" src="http://dev1.dev.lo/fe_go/mobileView/origin.test.html" />-->
<script >
    function addScriptTag(src) {
        let script = document.createElement('script');
        script.setAttribute("type","text/javascript");
        script.src = src;
        document.body.appendChild(script);
    }

    window.onload = function () {
        addScriptTag('http://example.com/ip?callback=foo');
    }

    function foo(data) {
        console.log('Your public IP address is: ' + data.ip);
    };
</script>
</body>
</html>
